package com.jinhongone.pattern.behavior.state.after;

/**
 * @author jinho
 * @className OpeningState
 * @description 具体状态角色-开门
 * @date 2025/4/16 14:50
 */
public class OpeningState extends LiftState{
    @Override
    public void open() {
        System.out.println("电梯门开启....");
    }

    @Override
    public void close() {
        //设置环境对象状态变更
        super.getContext().setLiftState(Context.CLOSING_STATE);
        //通过环境对象进行电梯关门操作
        super.getContext().close();
    }

    @Override
    public void run() {

    }

    @Override
    public void stop() {

    }

}
